home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!panix!not-for-mail
- From: acinader@panix.com (Arthur Cinader Jr)
- Newsgroups: comp.lang.c,gnu.gcc.help
- Subject: CURSES ORA sample wont work, why?
- Date: 23 Mar 1996 22:16:31 -0500
- Organization: Panix
- Message-ID: <4j2eqf$7h3@panix.com>
- NNTP-Posting-Host: panix.com
-
- I am trying to teach myself to program. I want to do some
- simple character "drawing" to screen and curses should be good
- for the purpose. I got O'Reilly Associates "Programing with
- curses" and have tried a slightly modified version of their
- init scr program...I am using gcc v2.6. Here is the errors I
- am getting. Other than stdin I have little experience with
- included libraries, so I am likely missing something
- obvious..please help if you can
-
- % gcc -lcurses test.c
- test.c: In function `main':
- test.c:9: warning: passing arg 2 of `signal' makes pointer
- from integer without
- a cast
- /tmp/cc0016511.o: Undefined symbol _initscr referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _stdscr referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _box referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _stdscr referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _wgetch referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _LINES referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _COLS referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _mvcur referenced from text segment
- /tmp/cc0016511.o: Undefined symbol _endwin referenced from text segment
-
-
- ****here is the source:
-
- #include <curses.h>
- #include <signal.h>
-
- main()
- {
- int die();
-
- initscr();
- signal(SIGINT, die); /* This is causing a problem */
- box(stdscr, '-','*');
- getch(); /* This just pauses the program till I input */
- die();
- }
-
- die()
- {
- signal(SIGINT, SIG_IGN);
- mvcur(0, COLS -1, LINES -1, 0);
- endwin();
- exit(0);
- }
-
-
-
-